# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Galen Abell <galen@galenabell.com>
pkgname=py3-milc
pkgver=1.9.0
pkgrel=0
pkgdesc="Opinionated Batteries-Included Python 3 CLI Framework"
url="https://milc.clueboard.co"
arch="noarch"
license="MIT"
depends="python3 py3-argcomplete py3-colorama py3-halo py3-platformdirs"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest py3-semver"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/clueboard/milc/archive/$pkgver.tar.gz"
builddir="$srcdir/milc-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
2fa2e68876f856971810b230c1dd0807e30c576647e3da11664a44f28750a3091196a0a3769ef968d68799641c91782dca656125d73f8d3cdef7e936b1436d3e  py3-milc-1.9.0.tar.gz
"
